package com.bluemor.reddotface.activity;

import java.util.ArrayList;
import java.util.List;

import com.bluemor.reddotface.R;
import com.bluemor.reddotface.adapter.ViewpagerAdapter;
import com.bluemor.reddotface.view.AngelDetailFragment1;
import com.bluemor.reddotface.view.AngelDetailFragment2;

import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.view.ViewPager;

public class MainDetailActivity extends FragmentActivity {
	private ViewPager viewPager_angel;
	private List<Fragment> fragments = new ArrayList<Fragment>();
	private ViewpagerAdapter vAdapter;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_maindetail);
		viewPager_angel = (ViewPager) findViewById(R.id.viewpager_angel_main);
		Fragment fragment1 = AngelDetailFragment1.getInstance();
		Fragment fragment2 = AngelDetailFragment2.getInstance();
		fragments.add(fragment1);
		fragments.add(fragment2);
		vAdapter = new ViewpagerAdapter(getSupportFragmentManager(), fragments);
		viewPager_angel.setAdapter(vAdapter);
	}
	
}
